Page({
  data: {
    merchantList: [
      { name: 'KTV老板', img: 'https://file.yichuangpark.com/mzProgram/remote-image/home-icon/img_merchant_1.png' },
      { name: '连锁酒吧', img: 'https://file.yichuangpark.com/mzProgram/remote-image/home-icon/img_merchant_2.png' },
      { name: '直播带货', img: 'https://file.yichuangpark.com/mzProgram/remote-image/home-icon/img_merchant_3.png' },
      { name: '抖音电商', img: 'https://file.yichuangpark.com/mzProgram/remote-image/home-icon/img_merchant_4.png' },
      { name: '视频店铺', img: 'https://file.yichuangpark.com/mzProgram/remote-image/home-icon/img_merchant_5.png' },
      { name: '建材商贸', img: 'https://file.yichuangpark.com/mzProgram/remote-image/home-icon/img_merchant_6.png' },
      { name: '旅游出行', img: 'https://file.yichuangpark.com/mzProgram/remote-image/home-icon/img_merchant_7.png' },
      { name: '连锁房产', img: 'https://file.yichuangpark.com/mzProgram/remote-image/home-icon/img_merchant_8.png' },
      { name: '二奢店铺', img: 'https://file.yichuangpark.com/mzProgram/remote-image/home-icon/img_merchant_9.png' },
      { name: '家具商城', img: 'https://file.yichuangpark.com/mzProgram/remote-image/home-icon/img_merchant_10.png' },
      { name: '连锁餐饮', img: 'https://file.yichuangpark.com/mzProgram/remote-image/home-icon/img_merchant_11.png' },
      { name: '医疗美容', img: 'https://file.yichuangpark.com/mzProgram/remote-image/home-icon/img_merchant_12.png' },
      { name: '店群商铺', img: 'https://file.yichuangpark.com/mzProgram/remote-image/home-icon/img_merchant_13.png' },
      { name: '二手车商', img: 'https://file.yichuangpark.com/mzProgram/remote-image/home-icon/img_merchant_14.png' },
      { name: '装修行业', img: 'https://file.yichuangpark.com/mzProgram/remote-image/home-icon/img_merchant_15.png' },
      { name: '家政平台', img: 'https://file.yichuangpark.com/mzProgram/remote-image/home-icon/img_merchant_16.png' },
    ],
    ratio: 1,
    scrollTop: 0
  },
  handlerToIndustryPage() {
    wx.navigateTo({
      url: '/pages/home/industry/index'
    })
  },
  onReady() {
    wx.getSystemInfo({
      success: (res) =>{
        const screenWidth = res.screenWidth
        const ratio = screenWidth / 750
        this.setData({
          ratio
        })
      }
    })
  },
  onPageScroll: function (e) {
    const { ratio } = this.data
    this.setData({
      scrollTop: e.scrollTop / ratio
    })
  }

})
